﻿{{#each data}}
	<tr data-id="{{userId}}" >
		<td class="userName">{{fullName}}</td>
		<td>{{userLogin}}</td>
        <td>{{email}}</td>
        <td>
            {{#each userCompanies}}
                {{#ifCond companyId '==' ../../cpyIdGroupComp}}
                    {{#each groups}}
                        <li>{{name}}</li>
                    {{/each}}
                {{/ifCond}}
            {{/each}}
        </td>
        <td>
            {{#each userCompanies}}
                {{#ifCond companyId '==' ../../cpyIdRolComp}}
                    <li>{{rol.name}}</li>
                {{/ifCond}}
            {{/each}}
        </td>
        <td>
            <div class="options" >
                <button class="btn btn-green btn-edit" data-original-title="edit user"><i class="icon-edit"></i></button>
                <button class="btn btn-blue btn-preference" data-original-title="edit preference"><i class="icon-list-ol"></i></button>
                {{#ifCond active '==' true}}
                    <input type="checkbox" name="remember" class="icheck-me user-state" data-skin="square" data-color="blue" checked>
                {{else}}
                    <input type="checkbox" name="remember" class="icheck-me user-state" data-skin="square" data-color="blue">
                {{/ifCond}}
                <button class="btn btn-red btn-delete" data-original-title="delete user"><i class="icon-trash"></i></button>
            </div>
        </td>
	</tr>
{{/each}}